﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace FI.Core
{
    /// <summary>
    /// The base class of all data collection used as search result.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    [DataContract(Namespace = Constants.Namespace, Name = "AuditableSearchResultOf{0}")]
    public class SearchResult<T>: PageableResult<Auditable<T>>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SearchResult{T}"/> class.
        /// </summary>
        /// <param name="items">The items.</param>
        /// <param name="totalRecords">The total records.</param>
        /// <param name="nextPage">The next page.</param>
        public SearchResult(IEnumerable<Auditable<T>> items, int totalRecords, Uri nextPage = null)
            : base(items, totalRecords, nextPage)
        { }
    }
}
